import numpy as np

E = 1.006  # 标准电压
R = 8.314  # 摩尔气体常量
T = 700 + 273  # 温度
n = 4  # 该反应转移电子数
F = 96485.3383  # 法拉第常数

neg_atm_water = 0.03  # 负极水分压
neg_atm_hydrogen = 0.97  # 负极氢气分压
pos_atm_oxygen = [1, 0.21, 0.1, 0.01, 0.001, 0.0001, 0.00001]  # 正极氧分压
for x in range(0,len(pos_atm_oxygen)):
    EE = E - R * T / n / F * np.log(np.power(neg_atm_water, 2) / pos_atm_oxygen[x] / np.power(neg_atm_hydrogen, 2))
    print(str(pos_atm_oxygen[x])+"  "+str(EE))
